Public Class WordReportP5

#Region "Fields"
    Protected _report_table_1_station_number As Integer
    Protected _report_table_1_number As Integer
    Protected _report_table_1_organization_name As String
    Protected _report_table_1_all_police As Integer
    Protected _report_table_1_diagnose_police As Integer
    Protected _report_table_1_absent_police As Integer
    Protected _report_table_1_percent As Double
    Protected _report_table_2_1_diagnose_police As Integer
    Protected _report_table_2_1_abnormal_police As Integer
    Protected _report_table_2_1_normal_police As Integer
    Protected _report_table_2_2_number_abnormal As String
    Protected _report_table_2_2_police_abnormal As Integer
    Protected _report_table_2_2_police_all As Integer
    Protected _report_table_3_1_list_number As Short
    Protected _report_table_3_1_list_name As String
    Protected _report_table_3_1_sum_exam As Integer
    Protected _report_table_3_1_sum_abnormal As Integer
    Protected _report_table_3_1_sum_diagnose As Integer
    Protected _report_table_3_2_list_number As Short
    Protected _report_table_3_2_list_name As String
    Protected _report_table_3_2_diagnose_year_befor_2 As Integer
    Protected _report_table_3_2_abnormal_year_befor_2 As Integer
    Protected _report_table_3_2_diagnose_year_befor_1 As Integer
    Protected _report_table_3_2_abnormal_year_befor_1 As Integer
    Protected _report_table_3_2_diagnose_year_now As Integer
    Protected _report_table_3_2_abnormal_year_now As Integer
    Protected _report_table_4_list_name As String
    Protected _report_table_4_list_price As Double
    Protected _report_table_4_list_quantity As Integer
    Protected _Data As ArrayList
    Protected _DataCurrent As Integer
#End Region

#Region "Properties"
    Public Property report_table_1_station_number() As Integer
        Get
            Return _report_table_1_station_number
        End Get
        Set(ByVal value As Integer)
            _report_table_1_station_number = value
        End Set
    End Property

    Public Property report_table_1_number() As Integer
        Get
            Return _report_table_1_number
        End Get
        Set(ByVal value As Integer)
            _report_table_1_number = value
        End Set
    End Property

    Public Property report_table_1_organization_name() As String
        Get
            Return _report_table_1_organization_name
        End Get
        Set(ByVal value As String)
            _report_table_1_organization_name = value
        End Set
    End Property

    Public Property report_table_1_all_police() As Integer
        Get
            Return _report_table_1_all_police
        End Get
        Set(ByVal value As Integer)
            _report_table_1_all_police = value
        End Set
    End Property

    Public Property report_table_1_diagnose_police() As Integer
        Get
            Return _report_table_1_diagnose_police
        End Get
        Set(ByVal value As Integer)
            _report_table_1_diagnose_police = value
        End Set
    End Property

    Public Property report_table_1_absent_police() As Integer
        Get
            Return _report_table_1_absent_police
        End Get
        Set(ByVal value As Integer)
            _report_table_1_absent_police = value
        End Set
    End Property

    Public Property report_table_1_percent() As Double
        Get
            Return _report_table_1_percent
        End Get
        Set(ByVal value As Double)
            _report_table_1_percent = value
        End Set
    End Property

    Public Property report_table_2_1_diagnose_police() As Integer
        Get
            Return _report_table_2_1_diagnose_police
        End Get
        Set(ByVal value As Integer)
            _report_table_2_1_diagnose_police = value
        End Set
    End Property

    Public Property report_table_2_1_abnormal_police() As Integer
        Get
            Return _report_table_2_1_abnormal_police
        End Get
        Set(ByVal value As Integer)
            _report_table_2_1_abnormal_police = value
        End Set
    End Property

    Public Property report_table_2_1_normal_police() As Integer
        Get
            Return _report_table_2_1_normal_police
        End Get
        Set(ByVal value As Integer)
            _report_table_2_1_normal_police = value
        End Set
    End Property

    Public Property report_table_2_2_number_abnormal() As String
        Get
            Return _report_table_2_2_number_abnormal
        End Get
        Set(ByVal value As String)
            _report_table_2_2_number_abnormal = value
        End Set
    End Property

    Public Property report_table_2_2_police_abnormal() As Integer
        Get
            Return _report_table_2_2_police_abnormal
        End Get
        Set(ByVal value As Integer)
            _report_table_2_2_police_abnormal = value
        End Set
    End Property

    Public Property report_table_2_2_police_all() As Integer
        Get
            Return _report_table_2_2_police_all
        End Get
        Set(ByVal value As Integer)
            _report_table_2_2_police_all = value
        End Set
    End Property

    Public Property report_table_3_1_list_number() As Short
        Get
            Return _report_table_3_1_list_number
        End Get
        Set(ByVal value As Short)
            _report_table_3_1_list_number = value
        End Set
    End Property

    Public Property report_table_3_1_list_name() As String
        Get
            Return _report_table_3_1_list_name
        End Get
        Set(ByVal value As String)
            _report_table_3_1_list_name = value
        End Set
    End Property

    Public Property report_table_3_1_sum_exam() As Integer
        Get
            Return _report_table_3_1_sum_exam
        End Get
        Set(ByVal value As Integer)
            _report_table_3_1_sum_exam = value
        End Set
    End Property

    Public Property report_table_3_1_sum_abnormal() As Integer
        Get
            Return _report_table_3_1_sum_abnormal
        End Get
        Set(ByVal value As Integer)
            _report_table_3_1_sum_abnormal = value
        End Set
    End Property

    Public Property report_table_3_1_sum_diagnose() As Integer
        Get
            Return _report_table_3_1_sum_diagnose
        End Get
        Set(ByVal value As Integer)
            _report_table_3_1_sum_diagnose = value
        End Set
    End Property

    Public Property report_table_3_2_list_number() As Short
        Get
            Return _report_table_3_2_list_number
        End Get
        Set(ByVal value As Short)
            _report_table_3_2_list_number = value
        End Set
    End Property

    Public Property report_table_3_2_list_name() As String
        Get
            Return _report_table_3_2_list_name
        End Get
        Set(ByVal value As String)
            _report_table_3_2_list_name = value
        End Set
    End Property

    Public Property report_table_3_2_diagnose_year_befor_2() As Integer
        Get
            Return _report_table_3_2_diagnose_year_befor_2
        End Get
        Set(ByVal value As Integer)
            _report_table_3_2_diagnose_year_befor_2 = value
        End Set
    End Property

    Public Property report_table_3_2_abnormal_year_befor_2() As Integer
        Get
            Return _report_table_3_2_abnormal_year_befor_2
        End Get
        Set(ByVal value As Integer)
            _report_table_3_2_abnormal_year_befor_2 = value
        End Set
    End Property

    Public Property report_table_3_2_diagnose_year_befor_1() As Integer
        Get
            Return _report_table_3_2_diagnose_year_befor_1
        End Get
        Set(ByVal value As Integer)
            _report_table_3_2_diagnose_year_befor_1 = value
        End Set
    End Property

    Public Property report_table_3_2_abnormal_year_befor_1() As Integer
        Get
            Return _report_table_3_2_abnormal_year_befor_1
        End Get
        Set(ByVal value As Integer)
            _report_table_3_2_abnormal_year_befor_1 = value
        End Set
    End Property

    Public Property report_table_3_2_diagnose_year_now() As Integer
        Get
            Return _report_table_3_2_diagnose_year_now
        End Get
        Set(ByVal value As Integer)
            _report_table_3_2_diagnose_year_now = value
        End Set
    End Property

    Public Property report_table_3_2_abnormal_year_now() As Integer
        Get
            Return _report_table_3_2_abnormal_year_now
        End Get
        Set(ByVal value As Integer)
            _report_table_3_2_abnormal_year_now = value
        End Set
    End Property

    Public Property report_table_4_list_name() As String
        Get
            Return _report_table_4_list_name
        End Get
        Set(ByVal value As String)
            _report_table_4_list_name = value
        End Set
    End Property

    Public Property report_table_4_list_price() As Double
        Get
            Return _report_table_4_list_price
        End Get
        Set(ByVal value As Double)
            _report_table_4_list_price = value
        End Set
    End Property

    Public Property report_table_4_list_quantity() As Integer
        Get
            Return _report_table_4_list_quantity
        End Get
        Set(ByVal value As Integer)
            _report_table_4_list_quantity = value
        End Set
    End Property
#End Region

#Region "Methods"
    Public Function getTable_1(ByVal inYear As String, ByVal inOrganizationID As String) As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table1"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table1")

        Return objDs
    End Function

    Public Function getsTable_1(ByVal inYear As String, ByVal inOrganizationID As String) As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table1"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table1")

        For Each objDr As System.Data.DataRow In objDs.Tables("Table1").Rows
            Dim obj As New WordReportP5()
            obj._report_table_1_station_number = objDr.Item("number")
            obj._report_table_1_number = objDr.Item("number")
            obj._report_table_1_organization_name = objDr.Item("station_name")
            obj._report_table_1_all_police = objDr.Item("all_police")
            obj._report_table_1_diagnose_police = objDr.Item("diagnose_police")
            obj._report_table_1_absent_police = objDr.Item("absent_police")
            obj._report_table_1_percent = objDr.Item("percent")
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Function getTable_2_1(ByVal inYear As String, ByVal inOrganizationID As String) As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table2_1"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table2_1")

        Return objDs
    End Function

    Public Function getsTable_2_1(ByVal inYear As String, ByVal inOrganizationID As String) As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table2_1"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table2_1")

        For Each objDr As System.Data.DataRow In objDs.Tables("Table2_1").Rows
            Dim obj As New WordReportP5()
            obj._report_table_2_1_diagnose_police = objDr.Item("diagnose_police")
            obj._report_table_2_1_abnormal_police = objDr.Item("abnormal_police")
            obj._report_table_2_1_normal_police = objDr.Item("normal_police")
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Function getTable_2_2(ByVal inYear As String, ByVal inOrganizationID As String) As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table2_2"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table2_2")

        Return objDs
    End Function

    Public Function getsTable_2_2(ByVal inYear As String, ByVal inOrganizationID As String) As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table2_2"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table2_2")

        For Each objDr As System.Data.DataRow In objDs.Tables("Table2_2").Rows
            Dim obj As New WordReportP5()
            obj._report_table_2_2_number_abnormal = objDr.Item("number_abnormal")
            obj._report_table_2_2_police_abnormal = objDr.Item("police_abnormal")
            obj._report_table_2_2_police_all = objDr.Item("police_all")
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Function getTable_3_1(ByVal inYear As String, ByVal inOrganizationID As String) As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table3_1"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table3_1")

        Return objDs
    End Function

    Public Function getsTable_3_1(ByVal inYear As String, ByVal inOrganizationID As String) As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table3_1"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table3_1")

        For Each objDr As System.Data.DataRow In objDs.Tables("Table3_1").Rows
            Dim obj As New WordReportP5()
            obj._report_table_3_1_list_number = objDr.Item("list_number")
            obj._report_table_3_1_list_name = objDr.Item("list_name_1")
            obj._report_table_3_1_sum_exam = IIf(IsDBNull(objDr.Item("sum_exam")), 0, objDr.Item("sum_exam"))
            obj._report_table_3_1_sum_abnormal = IIf(IsDBNull(objDr.Item("sum_result_false")), 0, objDr.Item("sum_result_false"))
            obj._report_table_3_1_sum_diagnose = objDr.Item("sCount")
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Function getTable_3_2(ByVal inYear As String, ByVal inOrganizationID As String) As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table3_2"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table3_2")

        Return objDs
    End Function

    Public Function getsTable_3_2(ByVal inYear As String, ByVal inOrganizationID As String) As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table3_2"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table3_2")

        For Each objDr As System.Data.DataRow In objDs.Tables("Table3_2").Rows
            Dim obj As New WordReportP5()
            obj._report_table_3_2_list_number = objDr.Item("list_number")
            obj._report_table_3_2_list_name = objDr.Item("list_name")
            obj._report_table_3_2_diagnose_year_befor_2 = IIf(IsDBNull(objDr.Item("all_year_2")), 0, objDr.Item("all_year_2"))
            obj._report_table_3_2_abnormal_year_befor_2 = IIf(IsDBNull(objDr.Item("all_abnormal_2")), 0, objDr.Item("all_abnormal_2"))
            obj._report_table_3_2_diagnose_year_befor_1 = IIf(IsDBNull(objDr.Item("all_year_1")), 0, objDr.Item("all_year_1"))
            obj._report_table_3_2_abnormal_year_befor_1 = IIf(IsDBNull(objDr.Item("all_abnormal_1")), 0, objDr.Item("all_abnormal_1"))
            obj._report_table_3_2_diagnose_year_now = IIf(IsDBNull(objDr.Item("all_year")), 0, objDr.Item("all_year"))
            obj._report_table_3_2_abnormal_year_now = IIf(IsDBNull(objDr.Item("all_abnormal")), 0, objDr.Item("all_abnormal"))
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Function getTable_4(ByVal inYear As String, ByVal inOrganizationID As String) As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table4"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table4")

        Return objDs
    End Function

    Public Function getsTable_4(ByVal inYear As String, ByVal inOrganizationID As String) As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_WordReportP5Table4"
        objCmd.CommandTimeout = 0

        Dim objParam As New MySql.Data.MySqlClient.MySqlParameter("inYear", inYear)
        objCmd.Parameters.Add(objParam)

        objParam = New MySql.Data.MySqlClient.MySqlParameter("inOrganizationParentID", inOrganizationID)
        objCmd.Parameters.Add(objParam)

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "Table4")

        For Each objDr As System.Data.DataRow In objDs.Tables("Table4").Rows
            Dim obj As New WordReportP5()
            obj._report_table_4_list_name = objDr.Item("list_name")
            obj._report_table_4_list_price = objDr.Item("list_price")
            obj._report_table_4_list_quantity = objDr.Item("list_quantity")
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Sub LoadTable1(ByVal inYear As String, ByVal inOrganizationID As String)
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsTable_1(inYear, inOrganizationID)
    End Sub

    Public Sub LoadTable2_1(ByVal inYear As String, ByVal inOrganizationID As String)
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsTable_2_1(inYear, inOrganizationID)
    End Sub

    Public Sub LoadTable2_2(ByVal inYear As String, ByVal inOrganizationID As String)
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsTable_2_2(inYear, inOrganizationID)
    End Sub

    Public Sub LoadTable3_1(ByVal inYear As String, ByVal inOrganizationID As String)
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsTable_3_1(inYear, inOrganizationID)
    End Sub

    Public Sub LoadTable3_2(ByVal inYear As String, ByVal inOrganizationID As String)
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsTable_3_2(inYear, inOrganizationID)
    End Sub

    Public Sub LoadTable4(ByVal inYear As String, ByVal inOrganizationID As String)
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsTable_4(inYear, inOrganizationID)
    End Sub

    Public Function NextRecord() As Boolean
        If ((Not _Data Is Nothing) AndAlso (((Not _Data Is Nothing) AndAlso _
            (_DataCurrent < _Data.Count And _Data.Count > 0)))) Then
            Dim CurrentRow As WordReportP5 = _Data(_DataCurrent)
            _report_table_1_station_number = CurrentRow._report_table_1_station_number
            _report_table_1_number = CurrentRow._report_table_1_number
            _report_table_1_organization_name = CurrentRow._report_table_1_organization_name
            _report_table_1_all_police = CurrentRow._report_table_1_all_police
            _report_table_1_diagnose_police = CurrentRow._report_table_1_diagnose_police
            _report_table_1_absent_police = CurrentRow._report_table_1_absent_police
            _report_table_1_percent = CurrentRow._report_table_1_percent
            _report_table_2_1_diagnose_police = CurrentRow._report_table_2_1_diagnose_police
            _report_table_2_1_abnormal_police = CurrentRow._report_table_2_1_abnormal_police
            _report_table_2_1_normal_police = CurrentRow._report_table_2_1_normal_police
            _report_table_2_2_number_abnormal = CurrentRow._report_table_2_2_number_abnormal
            _report_table_2_2_police_abnormal = CurrentRow._report_table_2_2_police_abnormal
            _report_table_2_2_police_all = CurrentRow._report_table_2_2_police_all
            _report_table_3_1_list_number = CurrentRow._report_table_3_1_list_number
            _report_table_3_1_list_name = CurrentRow._report_table_3_1_list_name
            _report_table_3_1_sum_exam = CurrentRow._report_table_3_1_sum_exam
            _report_table_3_1_sum_abnormal = CurrentRow._report_table_3_1_sum_abnormal
            _report_table_3_1_sum_diagnose = CurrentRow._report_table_3_1_sum_diagnose
            _report_table_3_2_list_number = CurrentRow._report_table_3_2_list_number
            _report_table_3_2_list_name = CurrentRow._report_table_3_2_list_name
            _report_table_3_2_diagnose_year_befor_2 = CurrentRow._report_table_3_2_diagnose_year_befor_2
            _report_table_3_2_abnormal_year_befor_2 = CurrentRow._report_table_3_2_abnormal_year_befor_2
            _report_table_3_2_diagnose_year_befor_1 = CurrentRow._report_table_3_2_diagnose_year_befor_1
            _report_table_3_2_abnormal_year_befor_1 = CurrentRow._report_table_3_2_abnormal_year_befor_1
            _report_table_3_2_diagnose_year_now = CurrentRow._report_table_3_2_diagnose_year_now
            _report_table_3_2_abnormal_year_now = CurrentRow._report_table_3_2_abnormal_year_now
            _report_table_4_list_name = CurrentRow._report_table_4_list_name
            _report_table_4_list_price = CurrentRow._report_table_4_list_price
            _report_table_4_list_quantity = CurrentRow._report_table_4_list_quantity
            _DataCurrent += 1
            Return True
        End If
        Return False
    End Function
#End Region

End Class
